package com.scau.ums.service.imp.addUser;

import com.scau.ums.mapper.MaintainerMapper;
import com.scau.ums.mapper.StudentMapper;
import com.scau.ums.mapper.TeacherMapper;
import com.scau.ums.model.Maintainer;
import com.scau.ums.model.Student;
import com.scau.ums.model.Teacher;
import com.scau.ums.service.AddUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @author xfy
 * @version 1.0
 * @date 2019/7/23 10:03
 */

@Service
public class AddUserServiceImp implements AddUserService {
    @Autowired
    StudentMapper studentMapper;

    @Autowired
    TeacherMapper teacherMapper;

    @Autowired
    MaintainerMapper maintainerMapper;

    @Override
    public int addStudent(Student student) {
        return studentMapper.insertSelective(student);
    }

    @Override
    public int addTeacher(Teacher teacher) {
        return teacherMapper.insertSelective(teacher);
    }

    @Override
    public int addMaintainer(Maintainer maintainer) {
        return maintainerMapper.insertSelective(maintainer);
    }
}
